package com.imay.videorecord.filter.helper;

import android.content.Context;

import com.imay.videorecord.filter.base.gpuimage.GPUImageFilter;
import com.imay.videorecord.filter.imay.IF1977Filter;
import com.imay.videorecord.filter.imay.IFAmaroFilter;
import com.imay.videorecord.filter.imay.IFBeautifyFilter;
import com.imay.videorecord.filter.imay.IFBrannanFilter;
import com.imay.videorecord.filter.imay.IFEarlybirdFilter;
import com.imay.videorecord.filter.imay.IFHefeFilter;
import com.imay.videorecord.filter.imay.IFHudsonFilter;
import com.imay.videorecord.filter.imay.IFInkwellFilter;
import com.imay.videorecord.filter.imay.IFLomoFilter;
import com.imay.videorecord.filter.imay.IFLordKelvinFilter;
import com.imay.videorecord.filter.imay.IFNashvilleFilter;
import com.imay.videorecord.filter.imay.IFRiseFilter;
import com.imay.videorecord.filter.imay.IFSierraFilter;
import com.imay.videorecord.filter.imay.IFSutroFilter;
import com.imay.videorecord.filter.imay.IFToasterFilter;
import com.imay.videorecord.filter.imay.IFValenciaFilter;
import com.imay.videorecord.filter.imay.IFWaldenFilter;
import com.imay.videorecord.filter.imay.IFXprollFilter;




public class MagicFilterFactory {

	private static MagicFilterType filterType = MagicFilterType.NONE;   //NONE;

	public static GPUImageFilter initFilters(Context context, MagicFilterType type) {
		filterType = type;
		switch (type) {
            /*case WHITECAT:
                return new MagicWhiteCatFilter();
            case BLACKCAT:
                return new MagicBlackCatFilter();
            case SKINWHITEN:
                return new MagicSkinWhitenFilter();
            case ROMANCE:
                return new MagicRomanceFilter();
            case SAKURA:
                return new MagicSakuraFilter();
            case AMARO:
                return new MagicAmaroFilter();
            case WALDEN:
                return new MagicWaldenFilter();
            case ANTIQUE:
                return new MagicAntiqueFilter();
            case CALM:
                return new MagicCalmFilter();
            case BRANNAN:
                return new MagicBrannanFilter();
            case BROOKLYN:
                return new MagicBrooklynFilter();
            case EARLYBIRD:
                return new MagicEarlyBirdFilter();
            case FREUD:
                return new MagicFreudFilter();
            case HEFE:
                return new MagicHefeFilter();
            case HUDSON:
                return new MagicHudsonFilter();
            case INKWELL:
                return new MagicInkwellFilter();
            case KEVIN:
                return new MagicKevinFilter();
            case LOMO:
                return new MagicLomoFilter();
            case N1977:
                return new MagicN1977Filter();
            case NASHVILLE:
                return new MagicNashvilleFilter();
            case PIXAR:
                return new MagicPixarFilter();
            case RISE:
                return new MagicRiseFilter();
            case SIERRA:
                return new MagicSierraFilter();
            case SUTRO:
                return new MagicSutroFilter();
            case TOASTER2:
                return new MagicToasterFilter();
            case VALENCIA:
                return new MagicValenciaFilter();
            case XPROII:
                return new MagicXproIIFilter();
            case EVERGREEN:
                return new MagicEvergreenFilter();
            case HEALTHY:
                return new MagicHealthyFilter();
            case COOL:
                return new MagicCoolFilter();
            case EMERALD:
                return new MagicEmeraldFilter();
            case LATTE:
                return new MagicLatteFilter();
            case WARM:
                return new MagicWarmFilter();
            case TENDER:
                return new MagicTenderFilter();
            case SWEETS:
                return new MagicSweetsFilter();
            case NOSTALGIA:
                return new MagicNostalgiaFilter();
            case FAIRYTALE:
                return new MagicFairytaleFilter();
            case SUNRISE:
                return new MagicSunriseFilter();
            case SUNSET:
                return new MagicSunsetFilter();
            case CRAYON:
                return new MagicCrayonFilter();
            case SKETCH:
                return new MagicSketchFilter();
            //image adjust
            case BRIGHTNESS:
                return new GPUImageBrightnessFilter();
            case CONTRAST:
                return new GPUImageContrastFilter();
            case EXPOSURE:
                return new GPUImageExposureFilter();
            case HUE:
                return new GPUImageHueFilter();
            case SATURATION:
                return new GPUImageSaturationFilter();
            case SHARPEN:
                return new GPUImageSharpenFilter();
            case IMAGE_ADJUST:
                return new MagicImageAdjustFilter();*/

			//----------分--------隔----------符----------
			case I_BEAUTIFY:
				return new IFBeautifyFilter(context);
			case I_1977:
				return new IF1977Filter(context);
			case I_AMARO:
				return new IFAmaroFilter(context);
			case I_BRANNAN:
				return new IFBrannanFilter(context);
			case I_EARLYBIRD:
				return new IFEarlybirdFilter(context);
			case I_HEFE:
				return new IFHefeFilter(context);
			case I_HUDSON:
				return new IFHudsonFilter(context);
			case I_INKWELL:
				return new IFInkwellFilter(context);
			case I_LOMO:
				return new IFLomoFilter(context);
			case I_LORDKELVIN:
				return new IFLordKelvinFilter(context);
			case I_NASHVILLE:
				return new IFNashvilleFilter(context);
			case I_RISE:
				return new IFRiseFilter(context);
			case I_SIERRA:
				return new IFSierraFilter(context);
			case I_SUTRO:
				return new IFSutroFilter(context);
			case I_TOASTER:
				return new IFToasterFilter(context);
			case I_VALENCIA:
				return new IFValenciaFilter(context);
			case I_WALDEN:
				return new IFWaldenFilter(context);
			case I_XPROII:
				return new IFXprollFilter(context);
			case ORIGINAL:  //原图
				return null;
//                return new MagicBeautyFilter();
			default:
				return null;
		}
	}

	public MagicFilterType getCurrentFilterType() {
		return filterType;
	}
}
